import { Main as devMain } from "../src/Main";
class Unit {
    constructor() {
        console.log("starting unit test...");
        // this.distTest();
        this.mainTest();
        // this.loadTest();
        console.log("unit test end...");
    }
    async mainTest() {
        const rootPath = "D:/Desktop/test/trash/lowCode/dist";
        const myMain = new devMain(rootPath);
        myMain.dev();
        //load component ...
        const com = myMain.loadComponent("head");
        const componentInstance = new com.module(); //head component class from reflection
        const runtime = myMain.runComponent(com.componentInfo, componentInstance);
        // console.log(runtime.getJs());
        // console.log(runtime.getCss());
        // console.log(runtime.getDom().html());
        const impl = myMain.implementComponent(runtime);
        myMain.setConfigs(componentInstance, impl, runtime);
        //load component ...
        // configable.applyChange();
        myMain.beautify();
    }
    loadTest() {
        // const ci = new ComponentInfo("head");
        // const lc = new LoadComponent(ci);
        // const module = lc.loadComponent();
        // const dryrun = new RunComponent(
        //   ci,
        //   module,
        //   IdGenerator.gen(),
        //   new CreateDist().getDistStructure()
        // );
    }
    distTest() {
        // const t = new CreateDist();
    }
}
new Unit();
